package com.niit.entity;

import com.fasterxml.jackson.annotation.JsonProperty;

public class Product {

    /** id */
    @JsonProperty("productId")
    private int id;

    /** 商品名 */
    private String name;

    /** 价格 */
    private double price;

    /** 库存量 */
    @JsonProperty("stock_quantity")
    private int stockQuantity;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getStockQuantity() {
        return stockQuantity;
    }

    public void setStockQuantity(int stockQuantity) {
        this.stockQuantity = stockQuantity;
    }


    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", stockQuantity=" + stockQuantity +
                '}';
    }
}
